from django.contrib import admin
from app import models

# Register your models here.
class UserAdmin(admin.ModelAdmin):
    list_display = ('id','name','age')
    list_per_page = 2
    list_filter = ('id','phone') #一般配置分类字段
    search_fields = ('id','phone')

# @admin.register()
class CateTypeAdmin(admin.ModelAdmin):
    list_display = ('id','name','order_num')

# @admin.register(models.FruitEntity)
class FruitAdmin(admin.ModelAdmin):
    list_display = ('id','name','source','price','category')

admin.site.register(models.FruitEntity,FruitAdmin)
admin.site.register(models.UserEntity,UserAdmin)
admin.site.register(models.CateTypeEntity,CateTypeAdmin)

